<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css"/>
    <style>
        label div {
            height: 30px;
            width: 90px;
            padding-top: 6px;
            background-color: #0e9aef;

        }
    </style>
</head>
<body>
<div class="container">
    <div class="row">
        <div style="color:#2a62bc;margin-top: 20px;">您正在做的业务是：产品设计--产品档案管理--产品档案查询</div>
    </div>
    <div class="row">
        <div class="col-md-offset-10">
            <button type="button" class="btn btn-info btn-sm" id="clean11" href=""><a href="javascript:history.back()"
                                                                                      style="color:white">返回</a>
            </button>
        </div>
    </div>
    <div class="col-lg-12" style="border: 1px solid lightgrey">
        <div class="row" style="border: 1px solid gainsboro;background-color: #0e9aef;">
            <div class="col-md-12 h4" style="color: white">主信息</div>
        </div>
        <form class="form-horizontal " id="update_design_add_form">
            <input type="hidden" id="id" name="id">
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>产品编号</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" id="productId" readonly
                           name="productId">
                </div>
            </div>

            <div class="form-group col-md-6  has-feedback">
                <label class="col-md-2">
                    <div><span class="glyphicon glyphicon-asterisk" style="color: red"></span>产品名称</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" id="productName"
                           name="productName">
                    <!--                      <span style="color: red">√</span>-->
                    <span class=" glyphicon glyphicon-ok form-control-feedback" style="color: red"></span>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>制造商</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="factoryName" name="factoryName">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div><span class="glyphicon glyphicon-asterisk" style="color: red"></span>I级分类</div>
                </label>
                <div class="col-md-10">
                    <select class="form-control"
                            id="design_select1" name="firstKindName">
                        <option value="">--请选择--</option>
                    </select>
                </div>
            </div>

            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div><span class="glyphicon glyphicon-asterisk" style="color: red"></span>II级分类</div>
                </label>
                <div class="col-md-10">
                    <select class="form-control"
                            id="design_select2" name="secondKindName">
                        <option value="">--请选择--</option>
                    </select>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div><span class="glyphicon glyphicon-asterisk" style="color: red"></span>III级分类</div>
                </label>
                <div class="col-md-10">
                    <select class="form-control"
                            id="design_select3" name="thirdKindName">
                        <option value="">--请选择--</option>
                    </select>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>产品简称</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" src="" id="productNick"
                           name="productNick">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>用途类型</div>
                </label>
                <div class="col-md-10">
                    <select class="form-control" id="type" name="type">
                        <option value="">--请选择--</option>
                        <option value="Y001-1">商品</option>
                        <option value="Y001-2">物料</option>
                    </select>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>档次级别</div>
                </label>
                <div class="col-md-10">
                    <select class="form-control" id="productClass" name="productClass">
                        <option value="">--请选择--</option>
                        <option value="D001-1">高档</option>
                        <option value="D001-2">中档</option>
                        <option value="D001-3">低档</option>
                    </select>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>计量单位</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" id="personalUnit"
                           name="personalUnit">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>计量值</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="personalValue" name="personalValue">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div><span class="glyphicon glyphicon-asterisk" style="color: red"></span>市场单间(元)</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="listPrice" name="listPrice">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div><span class="glyphicon glyphicon-asterisk" style="color: red"></span>计划成本单价</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" id="costPrice" name="costPrice">
                </div>
            </div>
            <div class="row" style="border: 1px solid gainsboro;background-color: #0e9aef;">
                <div class="col-md-12 h4" style="color: white">辅助信息</div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>保修期</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="warranty" name="warranty">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>替代品名称</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="twinName" name="twinName">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>替代品编号</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="twinId" name="twinId">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>生命周期(年)</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="lifecycle" name="lifecycle">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>单位</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control"
                           id="amountUnit" name="amountUnit">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>产品经理</div>
                </label>
                <div class="col-md-10">

                    <input type="text" class="form-control"
                           id="responsiblePerson" name="responsiblePerson"
                           placeholder="请输入产品经理">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>供应商集合</div>
                </label>
                <div class="col-md-10">
                    <textarea rows="3" cols="53" id="providerGroup" name="providerGroup" lass="form-control"></textarea>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>产品描述</div>
                </label>
                <div class="col-md-10">
                    <textarea id="productDescribe" name="productDescribe" rows="3" cols="53"
                              lass="form-control"></textarea>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>登记人</div>
                </label>
                <div class="col-md-10">
                    <input id="register" name="register" type="text" class="form-control" placeholder="newer">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div>建档时间</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" placeholder="请输入建档时间" id="registerTime" name="registerTime">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-md-2">
                    <div></span>复核人</div>
                </label>
                <div class="col-md-10">
                    <input type="text" class="form-control" id="checker"
                           name="checker">
                </div>
            </div>
            <div class="row" style="border: 1px solid gainsboro;background-color: #0e9aef;">
                <div class="col-md-12 h4" style="color: white"></div>
            </div>

        </form>

    </div>


</div>
<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/js/hAdmin.js?v=4.1.0"></script>
<!--<script type="text/javascript" src="/js/index.js"></script>-->

<!-- 第三方插件 -->
<script src="/js/plugins/pace/pace.min.js"></script>
<script>
    $(function () {
        aa()
        bb()
        cc()
        dd()
    })

    function add(m) {
        return m < 10 ? '0' + m : m
    }

    function fortime(param) {
        let date = new Date(param);
        let y = date.getFullYear();
        let m = date.getMonth() + 1;
        let d = date.getDate();
        let h = date.getHours();
        let mm = date.getMinutes();
        let s = date.getSeconds();
        return (y + '-' + add(m) + '-' + add(d) + ' ' + add(h) + ':' + add(mm) + ':' + add(s));
    }


    function dd() {
        let changpin = localStorage.getItem("changpin")
        $.post("/design/productIdshow", {"productId": changpin}, function (res) {
            console.log(res)
            if (res != null) {
                $("#id").val(res.id)
                $("#productId").val(res.productId)
                $("#productName").val(res.productName)
                $("#factoryName").val(res.factoryName)
                $("#design_select1").val(res.firstKindId + "/" + res.firstKindName)
                $("#design_select2").val(res.secondKindId + "/" + res.secondKindName)
                $("#design_select3").val(res.thirdKindId + "/" + res.thirdKindName)
                $("#productNick").val(res.productNick)
                $("#type").val(res.type)
                $("#productClass").val(res.productClass)
                $("#personalUnit").val(res.personalUnit)
                $("#personalValue").val(res.personalValue)
                $("#listPrice").val(res.listPrice)
                $("#costPrice").val(res.costPrice)

                $("#warranty").val(res.warranty)
                $("#twinName").val(res.twinName)
                $("#twinId").val(res.twinId)
                $("#lifecycle").val(res.lifecycle)
                $("#amountUnit").val(res.amountUnit)
                $("#responsiblePerson").val(res.responsiblePerson)
                $("#providerGroup").val(res.providerGroup)
                $("#productDescribe").val(res.productDescribe)
                $("#register").val(res.register)
                $("#registerTime").val(fortime(res.registerTime))
            }

        })
    }

    function aa() {
        $.post("/DesignConflgFileKind/List", {"num": "1"}, function (res) {
            console.log(res)
            $("#update_design_add_form #design_select1 option:gt(0)").remove()
            for (let i = 0; i < res.length; i++) {
                let ary_object = res[i]
                let $option = $("<option>" + ary_object.kindName + "</option>")
                $option.val(ary_object.kindId + "/" + ary_object.kindName)
                $("#design_select1").append($option)
            }
        })
    }

    function bb() {
        $.post("/DesignConflgFileKind/List", {"num": "2"}, function (res) {
            console.log(res)
            $("#update_design_add_form #design_select2 option:gt(0)").remove()
            for (let i = 0; i < res.length; i++) {
                let ary_object = res[i]
                let $option = $("<option>" + ary_object.kindName + "</option>")
                $option.val(ary_object.kindId + "/" + ary_object.kindName)
                $("#design_select2").append($option)
            }
        })
    }

    function cc() {
        $.post("/DesignConflgFileKind/List", {"num": "3"}, function (res) {
            console.log(res)
            $("#update_design_add_form #design_select3 option:gt(0)").remove()
            for (let i = 0; i < res.length; i++) {
                let ary_object = res[i]
                let $option = $("<option>" + ary_object.kindName + "</option>")
                $option.val(ary_object.kindId + "/" + ary_object.kindName)
                $("#design_select3").append($option)
            }
        })
    }
</script>
</body>
</html>





